package com.xymtop.api.implement;

import com.xymtop.api.entity.MyApplication;
import com.xymtop.api.mapper.AppMapper;
import com.xymtop.api.service.AppService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName : AppImpl
 * @Description : 申请实体类实现
 * @Author : 肖叶茂
 * @Date: 2022/12/1  19:13
 */
@Service
public class AppImpl implements AppService {

    @Autowired
    private AppMapper appMapper;

    @Override
    public int add(MyApplication app) {
        return appMapper.add(app.getId(), app.getAppuserid(), app.getProjectid(), app.getContent(),app.getType(),app.getStatus(),app.getTime());
    }

    @Override
    public int changeStatus(String id, String type) {
        return appMapper.changeStatus(id,type);
    }

    @Override
    public List<MyApplication> getListUser(String userid) {
        return appMapper.getListUser(userid);
    }

    @Override
    public List<MyApplication> getListProject(String projectid) {
        return appMapper.getListProject(projectid);
    }
}
